<?php
/**
 * 单页
 * Created by PhpStorm.
 * User: Yui
 * Date: 2017/5/18 0018
 * Time: 14:24
 */

namespace common\services;

use common\models\SinglePage;
use common\library\comFun;

class SinglePageSve extends BaseSve
{
    public function update(array $data, string $scenario = ''):array
    {
        $data['update_time'] = comFun::formatDate($_SERVER['REQUEST_TIME']);
        return parent::update($data, $scenario);
    }

    public function getInfo($where):array
    {
        $SinglePage = new SinglePage();
        $Model = $SinglePage::find()->where($where)->orderBy('single_page_id DESC')->one()->toArray();
        return $Model;
    }
}